 

#ifndef __LH_TOCE_H__
#define __LH_TOCE_H__

#include "lh_include.h"


#define     TOUCH_NULL      0       
#define     TOUCH_GETY      0       
#define     TOUCH_GETN      1       
#define     TOC_SYN_YES     0       
#define     TOC_SYN_NO      1       

#define     GetAbs(a)       ((LH_S16)(a) > 0 ? (a) : (-(a)))


enum
{
    TOUCH_START = 0,            
    TOUCH_CATCH,                
    TOUCH_STOP,                 
    TOUCH_NOT,                  
    TOUCH_LEV_NOT,              
    TOUCH_CAT_NOT,              
    REDRAW_PREF,                
    REDRAW_LATER,               
};


typedef struct 
{
    LH_U16 NowEvent;         
    LH_U16 LastEvent;        
    LH_U16 PrdX;             
    LH_U16 PrdY;             
    LH_U16 NowX;             
    LH_U16 NowY;             
    LH_U16 LastX;            
    LH_U16 LastY;            
    LH_U8  TocSyn;           
}TOUCH_EVE; 


extern TOUCH_EVE   TcEve; 


void TcEveInit(void);
void SetTocSyn(void);
void ClrTocSyn(void);
void TouchAD_Seq(LH_S16 *Data);
LH_U8 TouchGet_XY(LH_U16 *X, LH_U16 *Y);
void UpDataTcEve(void);
void TouchTest(void);

#endif


